import http from '@/utils/http'

/**
 *  添加收货地址
 * @param {object} data 
 * @returns 
 */
export const postMemberAddress = data => http.post('/member/address',data)
/**
 * 获取收货地址列表
 * @returns 
 */
export const getMemberAddress = ()=> http.get('/member/address')
// 查询收收地址详情
export const getMemberAddressDetail = id => http.get('/member/address/'+id)
// 更新收获地址
export const putMemberAddress = (id,data) => http.put('/member/address/'+id,data)
// 删除收获地址
export const deleteMemberAddress = id => http.delete('/member/address/'+id)

// import http from "@/utils/http";
// /**
//  * 添加收货地址
//  */
// // export const postMemberAddress = (data) => {
// //   return http({
// //     url: "/member/address",
// //     method: "post",
// //     data,
// //   });
// // };
// export const postMemberAddress = data => http.post("/member/address",data)

// /**
//  * 获取收货地址列表
//  */
// // export const getMemberAddress = () => {
// //   return http({
// //     url: "/member/address",
// //   });
// // };
// export const getMemberAddress = ()=> http.get("/member/address")

// /**
//  * 查询收货地址详情
//  */
// // export const getMemberAddressDetail = (id) => {
// //   return http({
// //     url: `/member/address/${id}`,
// //   });};
// export const getMemberAddressDetail = id => http.get(`/member/address/${id}`)

// /**
//  * 更新收货地址
//  */
// // export const putMemberAddress = (id, data) => {
// //   return http({
// //     url: `/member/address/${id}`,
// //     method: "put",
// //     data,
// //   });
// // };
// export const putMemberAddress = (id,data)=> http.put(`/member/address/${id}`,data)

// /**
//  * 删除一条收货地址
//  */
// export const deleteMemberAddress = (id) => {
//   return http({
//     url: `/member/address/${id}`,
//     method: "delete",
//   });
// };
